﻿@{
    ViewBag.Title = "deliver_address";
    Layout = "~/Views/Shared/_MemberCenterLayout.cshtml";
}
@section Styles
{
    <link href="../../Content/themes/default/deliver_address.css" rel="stylesheet" type="text/css" />
}
@section Scripts
{
<script src="../../Scripts/districtselector.js" type="text/javascript"></script>
<script src="../../Scripts/phonecheck.js" type="text/javascript"></script>
    <script src="../../Scripts/deliver_address.js" type="text/javascript"></script>
}

<div class="main pageWidth pb">
    @{Html.RenderAction("TopNav", new { pageType = 1 });}
    <div class="clearself">
        <div class="left">
            @{Html.RenderAction("MemberMenu", new { pageType = 1 });}
        </div>
        <div class="right">
            <div class="account-security security-deliver" id="main-content">
               
                <form name="mainform" action="deliver_address" id="myAddress">
                <input name="ID" id="id" value="" type="hidden">
                <h2 class="h2-single">
                    <span class="entity">收货地址</span></h2>
                <h3>
                    <span class="entity-h3">新增收货地址</span>电话号码、手机号选填一项,其余均为必填项</h3>
                <ul class="elem-form section trade:addressEditor" id="ah:addressForm">
                    <li>
                        <label class="label-like" for="_fm_d_0_f">
                            收货人姓名:</label>
                        <p>
                            <input name="Consignee" id="_fm_d_0_f" class="inputtext input-long" type="text">
                            <span class="spark-indeed">*</span>
                        </p>
                    </li>
                    <li>
                        <label class="label-like">
                            所在地区:</label>
                        <p>
                            <select name="_fm_d_0_pr" title="省" id="_fm_d_0_pr" onchange="doChange(this)">
                                <option selected="selected" value=""></option>
                            </select>
                            省
                            <select name="_fm_d_0_c" title="市" id="_fm_d_0_c">
                                <option selected="selected" value=""></option>
                            </select>
                            市
                            <select name="_fm_d_0_a"  title="区" id="_fm_d_0_a">
                                <option selected="selected" value=""></option>
                            </select>
                            区
                            <input id="divisionCode" class="pc:divisionCode" value="" name="AreaCode" type="hidden">
                            <span class="spark-indeed">*</span>
                        </p>
                    </li>
                    <li>
                        <label class="label-like" for="_fm_d_0_ad">
                            街道地址:</label>
                        <p>
                            <textarea name="Address" id="_fm_d_0_ad" rows="3" cols="60"></textarea>
                            <span class="spark-indeed">*</span> <span class="ex-margin-left ex-weaken-gray">不需要重复填写省/市/区</span>
                        </p>
                    </li>
                    <li>
                        <label class="label-like" for="_fm_d_0_po">
                            邮政编码:</label>
                        <input name="ZipCode" id="_fm_d_0_po" class="inputtext input-short ds:areaCode"
                            type="text">
                        <span class="spark-indeed">*</span> <span class="ex-margin-left ex-weaken-gray">大陆以外地区可不填写</span>
                    </li>
                    <li>
                        <label class="label-like">
                            电话号码:</label>
                        <input name="_fm_d_0_ph" title="区号" id="phoneSection" class="inputtext input-tel-code"
                            type="text">
                        -
                        <input name="_fm_d_0_pho" title="电话号码" id="phoneCode" class="inputtext input-tel-num"
                            type="text">
                        -
                        <input name="_fm_d_0_phon" title="分机" id="phoneExt" class="inputtext input-tel-cell"
                            type="text">
                        <span class="ex-margin-left ex-weaken-gray">区号-电话号码-分机</span>
                        <input class="pc:formatPhone" id="formatPhone" value="" name="Tel" type="hidden">
                    </li>
                    <li>
                        <label class="label-like" for="mobilePhone">
                            手机号码:</label>
                        <p>
                            <input name="Phone" id="mobilePhone" class="inputtext input-long" type="text">
                        </p>
                    </li>
                    <li>
                        <label class="label-like" for="statusAddr">
                            设为默认:</label>
                        <input checked="checked"   id="statusAddr" type="checkbox">
                        <input name="ISDefalut" id="hfstatusAddr" type="hidden">
                    </li>
                    <li class="container-btn">
                        <div class="skin-gray" id="createD">
                           
                                <input type="button" value="保存" class="short-btn" onclick="createOrUpdate()"  />
                              

                        </div>
                    </li>
                </ul>
                <div class="tbl-deliver-address">
                    <table class="tbl-main" cellpadding="0" cellspacing="0" border="0">
                        <caption>
                            已保存的有效地址</caption>
                        <colgroup>
                            <col class="col-man">
                            <col class="col-area">
                            <col class="col-address">
                            <col class="col-postcode">
                            <col class="col-phone">
                            <col class="col-actions">
                        </colgroup>
                        <tbody>
                            <tr class="thead-tbl-grade">
                                <th>
                                    收货人
                                </th>
                                <th>
                                    所在地区
                                </th>
                                <th>
                                    街道地址
                                </th>
                                <th>
                                    邮编
                                </th>
                                <th>
                                    电话/手机
                                </th>
                                <th>
                                </th>
                                <th>
                                    操作
                                </th>
                            </tr>
                            
                        </tbody>
                    </table>
                    <p class="tbl-attach">
                        最多保存10个有效地址</p>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
